package wcache

import "gitee.com/snxamdf/wui/wdb/wcache/internal"

var _cache cache

func init() {
	if _cache == nil {
		_cache = &internal.Cache{}
	}
}

//简单的本地持久cache缓存
type cache interface {
	Put(key string, value string)
	Get(key string) string
	Del(key string)
}

func Put(key string, value string) {
	_cache.Put(key, value)
}

func Get(key string) string {
	return _cache.Get(key)
}

func Del(key string) {
	_cache.Del(key)
}
